<?php
/**
 * User: hjd-yao
 * Date: 2019/4/2
 * Time: 16:45
 */

namespace DC\Support\Traits;


trait DCResponse
{
    public function success($data)
    {
        return [
            'status'=>1,
            'data'=>$data
        ];
    }

    public function error($msg,$code=0)
    {
        return [
            'status'=>0,
            'code'=>$code,
            'errorMsg'=>$msg
        ];
    }
}